Snowflake Integration Setup
Snowflake Account Configuration
1. Create nOps Database, Role, User, and Warehouse
- SQL Commands
-- Step 1: Use ACCOUNTADMIN to create core resources and assign privileges
USE ROLE ACCOUNTADMIN;
-- Create role
CREATE ROLE IF NOT EXISTS nops;
-- Create warehouse and grant it to the role
CREATE WAREHOUSE IF NOT EXISTS nops;
GRANT ALL ON WAREHOUSE nops TO ROLE nops;
-- Create user with default role and warehouse
CREATE USER IF NOT EXISTS nops
PASSWORD = '<STRONG PASSWORD>'
DEFAULT_ROLE = nops
DEFAULT_WAREHOUSE = nops
MUST_CHANGE_PASSWORD = FALSE;
-- Assign role to user and optionally to accountadmin for admin access
GRANT ROLE nops TO USER nops;
GRANT ROLE nops TO ROLE accountadmin;
-- Grant access to Snowflake usage views (imported database)
GRANT IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE TO ROLE nops;
-- Create database (only ACCOUNTADMIN can do this unless delegated)
CREATE DATABASE IF NOT EXISTS nops;
GRANT USAGE ON DATABASE nops TO ROLE nops;
GRANT USAGE ON SCHEMA nops.public TO ROLE nops;
GRANT OWNERSHIP ON SCHEMA nops.public TO ROLE nops REVOKE CURRENT GRANTS;
2. Create Views for nOps Integration
- SQL Commands
-- Switch to limited role for view creation
USE ROLE nops;
USE WAREHOUSE nops;
-- Create views inside the nops database for integration usage
CREATE OR REPLACE VIEW nops.public.query_history AS
SELECT * FROM snowflake.account_usage.query_history;
CREATE OR REPLACE VIEW nops.public.warehouse_metering_history AS
SELECT * FROM snowflake.organization_usage.warehouse_metering_history;
CREATE OR REPLACE VIEW nops.public.usage_in_currency_daily AS
SELECT * FROM snowflake.organization_usage.usage_in_currency_daily;
-- Grant read access to the views
GRANT SELECT ON ALL VIEWS IN SCHEMA nops.public TO ROLE nops;
3. IP Allowlist Considerations
If your Snowflake cluster uses an IP allow list, add the following IP:
52.11.169.55
nOps Integration Steps
1. Prepare Snowflake Server URL
- Format:
<account_identifier>.<region>.snowflakecomputing.com
- Example:
xy12345.us-east-1.snowflakecomputing.com
2. Navigate to nOps Integration
- Access your Business Context+ Integrations
- Choose "Snowflake"
3. Configure Integration Details
Fill in the following information:
- Server URL
- Password
4. Verify Integration
- Verification SQL
-- Test as the nops role
USE ROLE nops;
SELECT * FROM nops.public.query_history LIMIT 1;
Troubleshooting
Common Integration Issues
-
Permission Errors
- Ensure the nops user has been granted the correct roles
- Verify the nops role has the necessary privileges
-
Connection Problems
- Double-check account identifier and region
- Confirm network connectivity
- Validate IP allowlist configuration
-
Data Access Issues
- Verify view creation and permissions
- Check that shared usage views are accessible
Support
If you encounter persistent issues, contact nOps support with:
- Snowflake account identifier
- Error messages
- Configuration details
Best Practices
- Use a dedicated role and user for nOps integration
- Regularly review and rotate credentials
- Monitor integration performance and data sync